/*
 * @Date: 2024-08-23 16:40:26
 * @Author: LiSong
 * @LastEditors: ljc
 * @LastEditTime: 2025-07-21 11:27:12
 * @Description: 下拉树
 */
export default {
  type: 'tree-select',
  icon: 'select-field',
  order: 210,
  enabled: true,
  formItemFlag: true,
  options: {
    // ----- 补充字段
    code: '', // 表单回显，字段编码
    dataField: '', // 数据字段，存储使用
    // ----- 原始字段
    name: '',
    label: '',
    labelAlign: '',
    defaultValue: undefined,
    placeholder: '',
    columnWidth: '200px',
    size: '',
    labelWidth: null,
    labelHidden: false,
    disabled: false,
    hidden: false,
    configType: 0,
    showCode: true,
    clearable: true,
    filterable: false,
    allowCreate: false,
    checkStrictly: false,
    // remote: false,
    automaticDropdown: false,  //自动下拉
    multiple: false,
    multipleLimit: 0,
    optionItemsSelect: [
      {
        value: '1',
        label: 'Level one 1',
        children: [],
      }
    ],
    optionConfig: {
      // 模式类型: static-静态数据 dict-字典数据 request-动态数据
      mode: 'static',
      // 替换字段
      fieldNames: {
        label: 'label',
        value: 'value',
        children: 'children',
      },
      // 字典项配置
      dictConfig: {
        // 字典类型: enums-本地枚举 base-基础数据
        dictType: 'enums',
        // 字典名称
        dictName: '',
        // 字典参数
        dictParams: '',
      },
      // 动态数据配置
      serveConfig: {
        url: '',
        method: '',
        params: '',
        paramsType: 'data'
      },
      // 静态数据配置
      staticConfig: {
        optionItems: [
          { "label": "选项一", "value": "1", "children": [], }
        ]
      }
    },
    required: false,
    requiredHint: '',
    validation: '',
    validationHint: '',
    //-------------------
    customClass: '',  //自定义css类名
    // labelIconClass: null,
    // labelIconPosition: 'rear',
    // labelTooltip: null,
    //-------------------
    onCreated: '',
    onMounted: '',
    // onRemoteQuery: '',
    onChange: '',
    // onFocus: '',
    onBlur: '',
    onValidate: '',
  },
}
